package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.dto.font.AwardsToDeclareTo;
import com.jeff.tianti.cms.entity.AwardsToDeclare;
import com.jeff.tianti.cms.dao.AwardsToDeclareDao;
import com.jeff.tianti.cms.dto.AwardsToDeclareQueryDTO;
import com.jeff.tianti.common.service.CommonService;
import com.jeff.tianti.common.entity.PageModel;
import org.springframework.stereotype.Service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * @author xujianfang
 * @desc AwardsToDeclareService�� 
 * @date 2019-07-05
 */
@Service
public class AwardsToDeclareService extends CommonService< AwardsToDeclare,String >  {

    @Autowired
    private AwardsToDeclareDao awardsToDeclareDao;

    @Autowired
    public void setAwardsToDeclareDao(AwardsToDeclareDao awardsToDeclareDao){
      super.setCommonDao(awardsToDeclareDao);
    }

    public PageModel<AwardsToDeclare> queryAwardsToDeclarePage(AwardsToDeclareQueryDTO awardsToDeclareQueryDTO){
           return this.awardsToDeclareDao.queryAwardsToDeclarePage(awardsToDeclareQueryDTO);
    }

    public List<AwardsToDeclare> queryAwardsToDeclareList(AwardsToDeclareQueryDTO awardsToDeclareQueryDTO){
           return this.awardsToDeclareDao.queryAwardsToDeclareList(awardsToDeclareQueryDTO);
    }


    public List<AwardsToDeclare> findByUid(String uid) {
        return awardsToDeclareDao.findByUid(uid);
    }

    public List<AwardsToDeclare> findByUidAndState(AwardsToDeclareTo awardsToDeclareTo) {
        return awardsToDeclareDao.findAllByUidAndState(awardsToDeclareTo.getUid(), awardsToDeclareTo.getState());
    }
}